package com.wyc.apidriver.controller;

import com.wyc.apidriver.service.PointUploadService;
import com.wyc.internalCommon.request.CarPointUploadDTO;
import com.wyc.internalCommon.result.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 轨迹上传Controller
 * 客户端每过n秒上传一次轨迹
 */
@RestController
public class PointUploadController {

    @Autowired
    private PointUploadService pointUploadService;

    @RequestMapping("/point-upload")
    public ApiResult upload(@RequestBody CarPointUploadDTO carPointUploadDTO){
        return pointUploadService.upload(carPointUploadDTO);
    }

}
